package aybolit.core.objects.model;
// Generated 27.02.2013 9:15:35 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Hospitales generated by hbm2java
 */
@Entity
@Table(name="hospitales"
    ,catalog="aybolit"
)
public class Hospitales  implements java.io.Serializable {


     private Integer hospitalId;
     private Status status;
     private String name;
     private String address;
     private String phone;
     private String email;
     private Date timestamp;
     private Set<Operators> operatorses = new HashSet<Operators>(0);
     private Set<Departments> departmentses = new HashSet<Departments>(0);
     private Set<Patientes> patienteses = new HashSet<Patientes>(0);

    public Hospitales() {
    }

    public Hospitales(Status status, String name, String address, String phone, String email, Date timestamp, Set<Operators> operatorses, Set<Departments> departmentses, Set<Patientes> patienteses) {
       this.status = status;
       this.name = name;
       this.address = address;
       this.phone = phone;
       this.email = email;
       this.timestamp = timestamp;
       this.operatorses = operatorses;
       this.departmentses = departmentses;
       this.patienteses = patienteses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="hospital_id", unique=true, nullable=false)
    public Integer getHospitalId() {
        return this.hospitalId;
    }
    
    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="status_id")
    public Status getStatus() {
        return this.status;
    }
    
    public void setStatus(Status status) {
        this.status = status;
    }
    
    @Column(name="name", length=1000)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="address", length=1000)
    public String getAddress() {
        return this.address;
    }
    
    public void setAddress(String address) {
        this.address = address;
    }
    
    @Column(name="phone", length=500)
    public String getPhone() {
        return this.phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    @Column(name="email", length=500)
    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="timestamp_", length=19)
    public Date getTimestamp() {
        return this.timestamp;
    }
    
    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="hospitales")
    public Set<Operators> getOperatorses() {
        return this.operatorses;
    }
    
    public void setOperatorses(Set<Operators> operatorses) {
        this.operatorses = operatorses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="hospitales")
    public Set<Departments> getDepartmentses() {
        return this.departmentses;
    }
    
    public void setDepartmentses(Set<Departments> departmentses) {
        this.departmentses = departmentses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="hospitales")
    public Set<Patientes> getPatienteses() {
        return this.patienteses;
    }
    
    public void setPatienteses(Set<Patientes> patienteses) {
        this.patienteses = patienteses;
    }




}


